package com.iengine.services.api.command.memo;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import com.iengine.services.api.command.AbstractPhoneApiCommand;
import com.iengine.services.api.utils.Constant;

public abstract class AbstractTxtMemosApiCommand extends AbstractPhoneApiCommand{

	/**
	 * 该语义类型
	 */
	private String commandType = "memos";
	
	/**
	 * 该语义值类型
	 */
	private String commandValueType = "memos";
	
	/**
	 * 直接返回标志
	 */
	private boolean directReturn = true;

	public String getCommandType() {
		return commandType;
	}

	public String getCommandValueType() {
		return commandValueType;
	}

	public boolean isDirectReturn() {
		return directReturn;
	}

	public Map addValue(Map map, boolean flag, Object value){
		if(value instanceof String){
			List temp = new ArrayList<String>();
			temp.add(value);
			map.put(Constant.RESULT_NLP_VALUE, temp);
		}else if(value instanceof List){
			map.put(Constant.RESULT_NLP_VALUE, value);
		}
		
		map.put(Constant.RESULT_NLP_RETURN_TYPE, flag);
		return map;
	}
	
	@Override
	public String getTTs() {
		return "";
	}
}
